<?php
namespace app\api\controller;
use think\Session;
/**
 * 账户中心
 */
class Login extends Api{
    
    protected function _initialize(){
        parent::_initialize();
        if($this->auth->isLogin()){
            $url = Session::get('referUrl');
            if($url){
                $this->redirect($url);
            }else{
                $this->redirect('account/index');
            }
            exit();
        }
    }

    public function index(){
        return $this->view->fetch();
    }
}